//
//  MySQLColumn.m
//  LibMySQL
//
//  Created by Marcus Grenängen on 2009-07-20.
//  Copyright 2009 SneWs Soft. All rights reserved.
//
#import "MySQLColumn.h"

@interface MySQLColumn (Private)
@property (nonatomic, readwrite, assign) NSInteger position;
@property (nonatomic, readwrite, assign) NSInteger mysqlDataType;
@property (nonatomic, readwrite, retain) NSString *name;
@end

@implementation MySQLColumn

#pragma mark -
#pragma mark Properties - GET / SET
@synthesize position;
@synthesize name;
@synthesize mysqlDataType;

#pragma mark -
#pragma mark Initialization and dealloc
/*
 *
 */
- (id)init {
	return [self initWithName: @"" position: -1 mySQLDataType: -1];
	
} // END METHOD: init: 

/*
 *
 */
- (id)initWithName:(NSString*)n position:(NSInteger)p mySQLDataType:(NSInteger)t {
	if (self = [super init]) {
		name = [n retain];
		position = p;
		mysqlDataType = t;
		
	} // END if (self = [super init])
	
	return self;
} // END METHOD: initWithName: 

/*
 *
 */
- (void)dealloc {
	[name release];
	
	[super dealloc];

} // END METHOD: dealloc:



- (NSString *)description {
	return [NSString stringWithFormat: @"\nMySQLColumn:\nPosition: %i\nName: %@",
			position, name];
	
} // END METHOD: description: 



@end

